import request from '@/utils/request.js'

// 获取搜索建议API
export const getSuggestListAPI = (kw) => {
  return request.get('/v1_0/suggestion', {
    // params 指的是 get 的参数对象
    params: {
      q: kw
    }
  })
}

// 跳转到搜索结果页
export const getSearchResultAPI = (kw, page) => {
  return request.get('/v1_0/search', {
    params: {
      q: kw, // 搜索关键词
      page // 页码值
    }
  })
}
